<template>
	<div>
		<baidu-map class="map" :center="marketPoint" :scroll-wheel-zoom="true" :zoom="zoom" @click="getPoint">
			<!-- 地图;类型 -->
			<bm-map-type :map-types="['BMAP_HYBRID_MAP','BMAP_NORMAL_MAP']" anchor="BMAP_ANCHOR_TOP_RIGHT">
			</bm-map-type>
			<!-- 城市 搜索 列表 -->
			<bm-city-list anchor="BMAP_ANCHOR_TOP_RIGHT" :offset="{width:100,height:10}"></bm-city-list>
			<bm-geolocation anchor="BMAP_ANCHOR_BOTTOM_RIGHT" :showAddressBar="true" :autoLocation="true">
			</bm-geolocation>
			<bm-panorama></bm-panorama>
		</baidu-map>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				marketPoint: {
					lng: 116.4,
					lat: 39.9
				},
				zoom: 16
			}
		},
		methods: {
			getPoint(a,b,c,d) {
				console.log(a['Ag']['lng'] + ',' + a['Ag']['lat']);
			}
		}
	}
</script>

<style>
	/* The container of BaiduMap must be set width & height. */
	.map {
		width: 100%;
		height: 70vw;
	}
</style>
